<?php


namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class Order extends Model
{
    protected $fillable = ['order_code','payment','discount','freight','tax','buyer_id_number','buyer_name','buyer_phone','receiving_name','receiving_phone','receiving_address','receiving_province','receiving_city','receiving_district','status','goods_value', 'remark'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     * @author luffyzhao@vip.126.com
     */
    public function orderProducts(){
        return $this->hasMany(OrderProduct::class, 'order_id');
    }
}